/**
  * Author: Jordi Vilaplana Mayoral <jvilaplana@semicinternet.com>
  * Date: 16/05/2011
  * 
  * OpenFileRename
  * Copyright (C) 2011 Semic Internet
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * 
  * @(#)
  * Description: Renames files following the specified format in Alfresco.
  */

package view;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.util.ResourceBundle;

import javax.swing.JLabel;
import javax.swing.border.Border;
import javax.swing.border.LineBorder;

public class StatusBar extends JLabel {
	private static final long serialVersionUID = -4038115103247581356L;

	private ResourceBundle rLabels;
	public StatusBar(ResourceBundle rLabels) {
		super();
		super.setPreferredSize(new Dimension(590, 16));
		this.rLabels = rLabels;
		setOpaque(true);
		setBackground(Color.WHITE);
		setFont(new Font("Courier New", Font.PLAIN, 11));
		Border border = LineBorder.createGrayLineBorder();
		setBorder(border);
		setMessage(rLabels.getString("statusReady"));
	}

	public void setMessage(String message) {
		setText("<html><b>" + rLabels.getString("status")+ ":</b> " + message + "</html>");        
	}
}
